using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

using SharpDepend.Shared;
using SharpDepend.Android.Renderer;
using SharpDepend.Classes;

namespace SharpDepend.Android
{
    public static class Manager
    {
        public static Context Context { get; private set; }

        /// <summary>
        /// Initialize Windows Desktop implementation of SharpDepend classes.
        /// </summary>
        public static void Init(Context context)
        {
            Context = context;

            SharpDepend.Manager.Registrate(
                new ClientManager(),
                null,
                new MulticastManager(),
                new ThreadManager(),
                new AESSecurityManager(),
                new GUITimerManager(),
                new FileManager(),
                null,
                null,
                new SharpDepend.WP8.GraphicsDisplayManager(),
                new KeyboardManager(),
                null,
                new StopwatchManager(),
                new EnviromentStatisticsManager(context));

            SharpDepend.Manager.GraphicsDisplayManager.AddDevice(new GraphicDevice(typeof(SoftwareRenderer), "Software"));
            SharpDepend.Manager.GraphicsDisplayManager.AddDevice(new GraphicDevice(typeof(OpenGLESRender), "OpenGLES"));
            
            // Set first graphics device as default.
            SharpDepend.Manager.GraphicsDisplayManager.SetGraphicsDevice(
                SharpDepend.Manager.GraphicsDisplayManager.AvailableDevices.ElementAt(1));
        }
    }
}
